﻿package Classes.Weapons.Rockets{
	import flash.display.Sprite;
	import Classes.Utils.*;
	import Classes.Elements.*;	
	import Classes.Weapons.*;
	import Classes.Sounds.GameSound;
	
	public class Penguin extends Rocket{
		public function Penguin(){
			execution = 10;
			crtspeed = 0;
			speed = -5;
			acceleration = -.5;
			life = 5;
			hp = 5;
			omega = 6;
			this.score = UnitType.Penguin.score;
			GameSound.PenguinLaunch.play();
		}
		
		override protected function move():void{
			inc++;
			if(Math.abs(crtspeed)<Math.abs(speed)){
				crtspeed+=acceleration;
				Moving.moveBeeline(this,crtspeed,180);
			}						
			else{
				Moving.Track(aTargets[0],this,-crtspeed,omega);
			}
			if(inc>160)
				this.hp = 0;
		}		
	}
}